home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / CIncludes / ImageCompression.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-22  |  50.7 KB  |  1,154 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        ImageCompression.h
  3.  
  4.      Contains:    QuickTime interfaces
  5.  
  6.      Version:    Technology:    Technology:    QuickTime 2.5
  7.                  Package:    Universal Interfaces 2.1.4
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. */
  18. #ifndef __IMAGECOMPRESSION__
  19. #define __IMAGECOMPRESSION__
  20.  
  21. #ifndef __TYPES__
  22. #include <Types.h>
  23. #endif
  24. #ifndef __QUICKDRAW__
  25. #include <Quickdraw.h>
  26. #endif
  27. #ifndef __QDOFFSCREEN__
  28. #include <QDOffscreen.h>
  29. #endif
  30. #ifndef __COMPONENTS__
  31. #include <Components.h>
  32. #endif
  33. #ifndef __WINDOWS__
  34. #include <Windows.h>
  35. #endif
  36. #ifndef __STANDARDFILE__
  37. #include <StandardFile.h>
  38. #endif
  39.  
  40. #ifdef __cplusplus
  41. extern "C" {
  42. #endif
  43.  
  44. #if PRAGMA_IMPORT_SUPPORTED
  45. #pragma import on
  46. #endif
  47.  
  48. #if PRAGMA_ALIGN_SUPPORTED
  49. #pragma options align=mac68k
  50. #endif
  51.  
  52. struct MatrixRecord {
  53.     Fixed                             matrix[3][3];
  54. };
  55. typedef struct MatrixRecord MatrixRecord;
  56.  
  57. typedef MatrixRecord *MatrixRecordPtr;
  58. struct FixedPoint {
  59.     Fixed                             x;
  60.     Fixed                             y;
  61. };
  62. typedef struct FixedPoint FixedPoint;
  63.  
  64. struct FixedRect {
  65.     Fixed                             left;
  66.     Fixed                             top;
  67.     Fixed                             right;
  68.     Fixed                             bottom;
  69. };
  70. typedef struct FixedRect FixedRect;
  71.  
  72.  
  73. enum {
  74.     kRawCodecType                = 'raw ',
  75.     kCinepakCodecType            = 'cvid',
  76.     kGraphicsCodecType            = 'smc ',
  77.     kAnimationCodecType            = 'rle ',
  78.     kVideoCodecType                = 'rpza',
  79.     kComponentVideoCodecType    = 'yuv2',
  80.     kJPEGCodecType                = 'jpeg',
  81.     kMotionJPEGACodecType        = 'mjpa',
  82.     kMotionJPEGBCodecType        = 'mjpb',
  83.     kSGICodecType                = '.SGI',
  84.     kPlanarRGBCodecType            = '8BPS',
  85.     kMacPaintCodecType            = 'PNTG',
  86.     kGIFCodecType                = 'gif ',
  87.     kPhotoCDCodecType            = 'kpcd',
  88.     kQuickDrawGXCodecType        = 'qdgx'
  89. };
  90.  
  91. /* These are the bits that are set in the Component flags, and also in the codecInfo struct. */
  92.  
  93. enum {
  94.     codecInfoDoes1                = (1L << 0),
  95.     codecInfoDoes2                = (1L << 1),
  96.     codecInfoDoes4                = (1L << 2),
  97.     codecInfoDoes8                = (1L << 3),
  98.     codecInfoDoes16                = (1L << 4),
  99.     codecInfoDoes32                = (1L << 5),
  100.     codecInfoDoesDither            = (1L << 6),
  101.     codecInfoDoesStretch        = (1L << 7),
  102.     codecInfoDoesShrink            = (1L << 8),
  103.     codecInfoDoesMask            = (1L << 9),
  104.     codecInfoDoesTemporal        = (1L << 10),
  105.     codecInfoDoesDouble            = (1L << 11),
  106.     codecInfoDoesQuad            = (1L << 12),
  107.     codecInfoDoesHalf            = (1L << 13),
  108.     codecInfoDoesQuarter        = (1L << 14),
  109.     codecInfoDoesRotate            = (1L << 15),
  110.     codecInfoDoesHorizFlip        = (1L << 16),
  111.     codecInfoDoesVertFlip        = (1L << 17),
  112.     codecInfoDoesSkew            = (1L << 18),
  113.     codecInfoDoesBlend            = (1L << 19),
  114.     codecInfoDoesWarp            = (1L << 20),
  115.     codecInfoDoesRecompress        = (1L << 21),
  116.     codecInfoDoesSpool            = (1L << 22),
  117.     codecInfoDoesRateConstrain    = (1L << 23)
  118. };
  119.  
  120.  
  121. enum {
  122.     codecInfoDepth1                = (1L << 0),
  123.     codecInfoDepth2                = (1L << 1),
  124.     codecInfoDepth4                = (1L << 2),
  125.     codecInfoDepth8                = (1L << 3),
  126.     codecInfoDepth16            = (1L << 4),
  127.     codecInfoDepth32            = (1L << 5),
  128.     codecInfoDepth24            = (1L << 6),
  129.     codecInfoDepth33            = (1L << 7),
  130.     codecInfoDepth34            = (1L << 8),
  131.     codecInfoDepth36            = (1L << 9),
  132.     codecInfoDepth40            = (1L << 10),
  133.     codecInfoStoresClut            = (1L << 11),
  134.     codecInfoDoesLossless        = (1L << 12),
  135.     codecInfoSequenceSensitive    = (1L << 13)
  136. };
  137.  
  138.  
  139. enum {
  140.     codecFlagUseImageBuffer        = (1L << 0),
  141.     codecFlagUseScreenBuffer    = (1L << 1),
  142.     codecFlagUpdatePrevious        = (1L << 2),
  143.     codecFlagNoScreenUpdate        = (1L << 3),
  144.     codecFlagWasCompressed        = (1L << 4),
  145.     codecFlagDontOffscreen        = (1L << 5),
  146.     codecFlagUpdatePreviousComp    = (1L << 6),
  147.     codecFlagForceKeyFrame        = (1L << 7),
  148.     codecFlagOnlyScreenUpdate    = (1L << 8),
  149.     codecFlagLiveGrab            = (1L << 9),
  150.     codecFlagDontUseNewImageBuffer = (1L << 10),
  151.     codecFlagInterlaceUpdate    = (1L << 11),
  152.     codecFlagCatchUpDiff        = (1L << 12),
  153.     codecFlagImageBufferNotSourceImage = (1L << 13),
  154.     codecFlagUsedNewImageBuffer    = (1L << 14),
  155.     codecFlagUsedImageBuffer    = (1L << 15)
  156. };
  157.  
  158.  
  159. enum {
  160.                                                                 /* The minimum data size for spooling in or out data */
  161.     codecMinimumDataSize        = 32768L
  162. };
  163.  
  164.  
  165. enum {
  166.     compressorComponentType        = 'imco',                        /* the type for "Components" which compress images */
  167.     decompressorComponentType    = 'imdc'                        /* the type for "Components" which decompress images */
  168. };
  169.  
  170. typedef Component CompressorComponent;
  171. typedef Component DecompressorComponent;
  172. typedef Component CodecComponent;
  173. #define    anyCodec                ((CodecComponent)0)
  174. #define    bestSpeedCodec            ((CodecComponent)-1)
  175. #define    bestFidelityCodec        ((CodecComponent)-2)
  176. #define    bestCompressionCodec    ((CodecComponent)-3)
  177. typedef long CodecType;
  178. typedef unsigned short CodecFlags;
  179. typedef unsigned long CodecQ;
  180.  
  181. enum {
  182.     codecLosslessQuality        = 0x00000400,
  183.     codecMaxQuality                = 0x000003FF,
  184.     codecMinQuality                = 0x00000000,
  185.     codecLowQuality                = 0x00000100,
  186.     codecNormalQuality            = 0x00000200,
  187.     codecHighQuality            = 0x00000300
  188. };
  189.  
  190.  
  191. enum {
  192.     codecCompletionSource        = (1 << 0),                        /* asynchronous codec is done with source data */
  193.     codecCompletionDest            = (1 << 1),                        /* asynchronous codec is done with destination data */
  194.     codecCompletionDontUnshield    = (1 << 2)                        /* on dest complete don't unshield cursor */
  195. };
  196.  
  197.  
  198. enum {
  199.     codecProgressOpen            = 0,
  200.     codecProgressUpdatePercent    = 1,
  201.     codecProgressClose            = 2
  202. };
  203.  
  204. typedef pascal OSErr (*ICMDataProcPtr)(Ptr *dataP, long bytesNeeded, long refcon);
  205. typedef pascal OSErr (*ICMFlushProcPtr)(Ptr data, long bytesAdded, long refcon);
  206. typedef pascal void (*ICMCompletionProcPtr)(OSErr result, short flags, long refcon);
  207. typedef pascal OSErr (*ICMProgressProcPtr)(short message, Fixed completeness, long refcon);
  208. typedef pascal void (*StdPixProcPtr)(PixMap *src, Rect *srcRect, MatrixRecord *matrix, short mode, RgnHandle mask, PixMap *matte, Rect *matteRect, short flags);
  209. typedef pascal void (*ICMAlignmentProcPtr)(Rect *rp, long refcon);
  210. typedef pascal void (*ICMCursorShieldedProcPtr)(const Rect *r, void *refcon, long flags);
  211. typedef pascal void (*ICMMemoryDisposedProcPtr)(Ptr memoryBlock, void *refcon);
  212. typedef void *ICMCursorNotify;
  213. typedef pascal OSErr (*ICMConvertDataFormatProcPtr)(void *refCon, long flags, Handle desiredFormat, void *srcData, long srcDataSize, void **dstData, long *dstDataSize);
  214.  
  215. #if GENERATINGCFM
  216. typedef UniversalProcPtr ICMDataUPP;
  217. typedef UniversalProcPtr ICMFlushUPP;
  218. typedef UniversalProcPtr ICMCompletionUPP;
  219. typedef UniversalProcPtr ICMProgressUPP;
  220. typedef UniversalProcPtr StdPixUPP;
  221. typedef UniversalProcPtr ICMAlignmentUPP;
  222. typedef UniversalProcPtr ICMCursorShieldedUPP;
  223. typedef UniversalProcPtr ICMMemoryDisposedUPP;
  224. typedef UniversalProcPtr ICMConvertDataFormatUPP;
  225. #else
  226. typedef ICMDataProcPtr ICMDataUPP;
  227. typedef ICMFlushProcPtr ICMFlushUPP;
  228. typedef ICMCompletionProcPtr ICMCompletionUPP;
  229. typedef ICMProgressProcPtr ICMProgressUPP;
  230. typedef StdPixProcPtr StdPixUPP;
  231. typedef ICMAlignmentProcPtr ICMAlignmentUPP;
  232. typedef ICMCursorShieldedProcPtr ICMCursorShieldedUPP;
  233. typedef ICMMemoryDisposedProcPtr ICMMemoryDisposedUPP;
  234. typedef ICMConvertDataFormatProcPtr ICMConvertDataFormatUPP;
  235. #endif
  236. typedef long ImageSequence;
  237. typedef long ImageSequenceDataSource;
  238. typedef long ImageTranscodeSequence;
  239. typedef long ImageFieldSequence;
  240. struct ICMProgressProcRecord {
  241.     ICMProgressUPP                     progressProc;
  242.     long                             progressRefCon;
  243. };
  244. typedef struct ICMProgressProcRecord ICMProgressProcRecord;
  245.  
  246. typedef ICMProgressProcRecord *ICMProgressProcRecordPtr;
  247. struct ICMCompletionProcRecord {
  248.     ICMCompletionUPP                 completionProc;
  249.     long                             completionRefCon;
  250. };
  251. typedef struct ICMCompletionProcRecord ICMCompletionProcRecord;
  252.  
  253. typedef ICMCompletionProcRecord *ICMCompletionProcRecordPtr;
  254. struct ICMDataProcRecord {
  255.     ICMDataUPP                         dataProc;
  256.     long                             dataRefCon;
  257. };
  258. typedef struct ICMDataProcRecord ICMDataProcRecord;
  259.  
  260. typedef ICMDataProcRecord *ICMDataProcRecordPtr;
  261. struct ICMFlushProcRecord {
  262.     ICMFlushUPP                     flushProc;
  263.     long                             flushRefCon;
  264. };
  265. typedef struct ICMFlushProcRecord ICMFlushProcRecord;
  266.  
  267. typedef ICMFlushProcRecord *ICMFlushProcRecordPtr;
  268. struct ICMAlignmentProcRecord {
  269.     ICMAlignmentUPP                 alignmentProc;
  270.     long                             alignmentRefCon;
  271. };
  272. typedef struct ICMAlignmentProcRecord ICMAlignmentProcRecord;
  273.  
  274. typedef ICMAlignmentProcRecord *ICMAlignmentProcRecordPtr;
  275. struct DataRateParams {
  276.     long                             dataRate;
  277.     long                             dataOverrun;
  278.     long                             frameDuration;
  279.     long                             keyFrameRate;
  280.     CodecQ                             minSpatialQuality;
  281.     CodecQ                             minTemporalQuality;
  282. };
  283. typedef struct DataRateParams DataRateParams;
  284.  
  285. typedef DataRateParams *DataRateParamsPtr;
  286. struct ImageDescription {
  287.     long                             idSize;                        /* total size of ImageDescription including extra data ( CLUTs and other per sequence data ) */
  288.     CodecType                         cType;                        /* what kind of codec compressed this data */
  289.     long                             resvd1;                        /* reserved for Apple use */
  290.     short                             resvd2;                        /* reserved for Apple use */
  291.     short                             dataRefIndex;                /* set to zero  */
  292.     short                             version;                    /* which version is this data */
  293.     short                             revisionLevel;                /* what version of that codec did this */
  294.     long                             vendor;                        /* whose  codec compressed this data */
  295.     CodecQ                             temporalQuality;            /* what was the temporal quality factor  */
  296.     CodecQ                             spatialQuality;                /* what was the spatial quality factor */
  297.     short                             width;                        /* how many pixels wide is this data */
  298.     short                             height;                        /* how many pixels high is this data */
  299.     Fixed                             hRes;                        /* horizontal resolution */
  300.     Fixed                             vRes;                        /* vertical resolution */
  301.     long                             dataSize;                    /* if known, the size of data for this image descriptor */
  302.     short                             frameCount;                    /* number of frames this description applies to */
  303.     Str31                             name;                        /* name of codec ( in case not installed )  */
  304.     short                             depth;                        /* what depth is this data (1-32) or ( 33-40 grayscale ) */
  305.     short                             clutID;                        /* clut id or if 0 clut follows  or -1 if no clut */
  306. };
  307. typedef struct ImageDescription ImageDescription;
  308.  
  309. typedef ImageDescription *ImageDescriptionPtr;
  310. typedef ImageDescriptionPtr *ImageDescriptionHandle;
  311. struct CodecInfo {
  312.     Str31                             typeName;                    /* name of the codec type i.e.: 'Apple Image Compression' */
  313.     short                             version;                    /* version of the codec data that this codec knows about */
  314.     short                             revisionLevel;                /* revision level of this codec i.e: 0x00010001 (1.0.1) */
  315.     long                             vendor;                        /* Maker of this codec i.e: 'appl' */
  316.     long                             decompressFlags;            /* codecInfo flags for decompression capabilities */
  317.     long                             compressFlags;                /* codecInfo flags for compression capabilities */
  318.     long                             formatFlags;                /* codecInfo flags for compression format details */
  319.     UInt8                             compressionAccuracy;        /* measure (1-255) of accuracy of this codec for compress (0 if unknown) */
  320.     UInt8                             decompressionAccuracy;        /* measure (1-255) of accuracy of this codec for decompress (0 if unknown) */
  321.     unsigned short                     compressionSpeed;            /* ( millisecs for compressing 320x240 on base mac II) (0 if unknown)  */
  322.     unsigned short                     decompressionSpeed;            /* ( millisecs for decompressing 320x240 on mac II)(0 if unknown)  */
  323.     UInt8                             compressionLevel;            /* measure (1-255) of compression level of this codec (0 if unknown)  */
  324.     UInt8                             resvd;                        /* pad */
  325.     short                             minimumHeight;                /* minimum height of image (block size) */
  326.     short                             minimumWidth;                /* minimum width of image (block size) */
  327.     short                             decompressPipelineLatency;    /* in milliseconds ( for asynchronous codecs ) */
  328.     short                             compressPipelineLatency;    /* in milliseconds ( for asynchronous codecs ) */
  329.     long                             privateData;
  330. };
  331. typedef struct CodecInfo CodecInfo;
  332.  
  333. struct CodecNameSpec {
  334.     CodecComponent                     codec;
  335.     CodecType                         cType;
  336.     Str31                             typeName;
  337.     Handle                             name;
  338. };
  339. typedef struct CodecNameSpec CodecNameSpec;
  340.  
  341. struct CodecNameSpecList {
  342.     short                             count;
  343.     CodecNameSpec                     list[1];
  344. };
  345. typedef struct CodecNameSpecList CodecNameSpecList;
  346.  
  347. typedef CodecNameSpecList *CodecNameSpecListPtr;
  348.  
  349. enum {
  350.     defaultDither                = 0,
  351.     forceDither                    = 1,
  352.     suppressDither                = 2,
  353.     useColorMatching            = 4
  354. };
  355.  
  356.  
  357. enum {
  358.     callStdBits                    = 1,
  359.     callOldBits                    = 2,
  360.     noDefaultOpcodes            = 4
  361. };
  362.  
  363.  
  364. enum {
  365.     graphicsModeStraightAlpha    = 256,
  366.     graphicsModePreWhiteAlpha    = 257,
  367.     graphicsModePreBlackAlpha    = 258,
  368.     graphicsModeCompostion        = 259,
  369.     graphicsModeStraightAlphaBlend = 260
  370. };
  371.  
  372.  
  373. enum {
  374.     evenField1ToEvenFieldOut    = 1 << 0,
  375.     evenField1ToOddFieldOut        = 1 << 1,
  376.     oddField1ToEvenFieldOut        = 1 << 2,
  377.     oddField1ToOddFieldOut        = 1 << 3,
  378.     evenField2ToEvenFieldOut    = 1 << 4,
  379.     evenField2ToOddFieldOut        = 1 << 5,
  380.     oddField2ToEvenFieldOut        = 1 << 6,
  381.     oddField2ToOddFieldOut        = 1 << 7
  382. };
  383.  
  384. struct ICMFrameTimeRecord {
  385.     wide                             value;                        /* frame time*/
  386.     long                             scale;                        /* timescale of value/duration fields*/
  387.     void *                            base;                        /* timebase*/
  388.  
  389.     long                             duration;                    /* duration frame is to be displayed (0 if unknown)*/
  390.     Fixed                             rate;                        /* rate of timebase relative to wall-time*/
  391.  
  392.     long                             recordSize;                    /* total number of bytes in ICMFrameTimeRecord*/
  393.  
  394.     long                             frameNumber;                /* number of frame, zero if not known*/
  395. };
  396. typedef struct ICMFrameTimeRecord ICMFrameTimeRecord;
  397.  
  398. typedef ICMFrameTimeRecord *ICMFrameTimePtr;
  399.  
  400. #if GENERATINGCFM
  401. #else
  402. #endif
  403.  
  404. enum {
  405.     uppICMDataProcInfo = kPascalStackBased
  406.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  407.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Ptr *)))
  408.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
  409.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long))),
  410.     uppICMFlushProcInfo = kPascalStackBased
  411.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  412.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Ptr)))
  413.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
  414.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long))),
  415.     uppICMCompletionProcInfo = kPascalStackBased
  416.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(OSErr)))
  417.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(short)))
  418.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long))),
  419.     uppICMProgressProcInfo = kPascalStackBased
  420.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  421.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short)))
  422.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Fixed)))
  423.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long))),
  424.     uppStdPixProcInfo = kPascalStackBased
  425.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(PixMap *)))
  426.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Rect *)))
  427.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(MatrixRecord *)))
  428.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(short)))
  429.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(RgnHandle)))
  430.          | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(PixMap *)))
  431.          | STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(Rect *)))
  432.          | STACK_ROUTINE_PARAMETER(8, SIZE_CODE(sizeof(short))),
  433.     uppICMAlignmentProcInfo = kPascalStackBased
  434.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Rect *)))
  435.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long))),
  436.     uppICMCursorShieldedProcInfo = kPascalStackBased
  437.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(const Rect *)))
  438.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void *)))
  439.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long))),
  440.     uppICMMemoryDisposedProcInfo = kPascalStackBased
  441.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Ptr)))
  442.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void *))),
  443.     uppICMConvertDataFormatProcInfo = kPascalStackBased
  444.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  445.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(void *)))
  446.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
  447.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Handle)))
  448.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void *)))
  449.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(long)))
  450.          | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(void **)))
  451.          | STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(long *)))
  452. };
  453.  
  454. #if GENERATINGCFM
  455. #define NewICMDataProc(userRoutine)        \
  456.         (ICMDataUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMDataProcInfo, GetCurrentArchitecture())
  457. #define NewICMFlushProc(userRoutine)        \
  458.         (ICMFlushUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMFlushProcInfo, GetCurrentArchitecture())
  459. #define NewICMCompletionProc(userRoutine)        \
  460.         (ICMCompletionUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMCompletionProcInfo, GetCurrentArchitecture())
  461. #define NewICMProgressProc(userRoutine)        \
  462.         (ICMProgressUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMProgressProcInfo, GetCurrentArchitecture())
  463. #define NewStdPixProc(userRoutine)        \
  464.         (StdPixUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppStdPixProcInfo, GetCurrentArchitecture())
  465. #define NewICMAlignmentProc(userRoutine)        \
  466.         (ICMAlignmentUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMAlignmentProcInfo, GetCurrentArchitecture())
  467. #define NewICMCursorShieldedProc(userRoutine)        \
  468.         (ICMCursorShieldedUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMCursorShieldedProcInfo, GetCurrentArchitecture())
  469. #define NewICMMemoryDisposedProc(userRoutine)        \
  470.         (ICMMemoryDisposedUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMMemoryDisposedProcInfo, GetCurrentArchitecture())
  471. #define NewICMConvertDataFormatProc(userRoutine)        \
  472.         (ICMConvertDataFormatUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMConvertDataFormatProcInfo, GetCurrentArchitecture())
  473. #else
  474. #define NewICMDataProc(userRoutine)        \
  475.         ((ICMDataUPP) (userRoutine))
  476. #define NewICMFlushProc(userRoutine)        \
  477.         ((ICMFlushUPP) (userRoutine))
  478. #define NewICMCompletionProc(userRoutine)        \
  479.         ((ICMCompletionUPP) (userRoutine))
  480. #define NewICMProgressProc(userRoutine)        \
  481.         ((ICMProgressUPP) (userRoutine))
  482. #define NewStdPixProc(userRoutine)        \
  483.         ((StdPixUPP) (userRoutine))
  484. #define NewICMAlignmentProc(userRoutine)        \
  485.         ((ICMAlignmentUPP) (userRoutine))
  486. #define NewICMCursorShieldedProc(userRoutine)        \
  487.         ((ICMCursorShieldedUPP) (userRoutine))
  488. #define NewICMMemoryDisposedProc(userRoutine)        \
  489.         ((ICMMemoryDisposedUPP) (userRoutine))
  490. #define NewICMConvertDataFormatProc(userRoutine)        \
  491.         ((ICMConvertDataFormatUPP) (userRoutine))
  492. #endif
  493.  
  494. #if GENERATINGCFM
  495. #define CallICMDataProc(userRoutine, dataP, bytesNeeded, refcon)        \
  496.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppICMDataProcInfo, (dataP), (bytesNeeded), (refcon))
  497. #define CallICMFlushProc(userRoutine, data, bytesAdded, refcon)        \
  498.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppICMFlushProcInfo, (data), (bytesAdded), (refcon))
  499. #define CallICMCompletionProc(userRoutine, result, flags, refcon)        \
  500.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppICMCompletionProcInfo, (result), (flags), (refcon))
  501. #define CallICMProgressProc(userRoutine, message, completeness, refcon)        \
  502.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppICMProgressProcInfo, (message), (completeness), (refcon))
  503. #define CallStdPixProc(userRoutine, src, srcRect, matrix, mode, mask, matte, matteRect, flags)        \
  504.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppStdPixProcInfo, (src), (srcRect), (matrix), (mode), (mask), (matte), (matteRect), (flags))
  505. #define CallICMAlignmentProc(userRoutine, rp, refcon)        \
  506.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppICMAlignmentProcInfo, (rp), (refcon))
  507. #define CallICMCursorShieldedProc(userRoutine, r, refcon, flags)        \
  508.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppICMCursorShieldedProcInfo, (r), (refcon), (flags))
  509. #define CallICMMemoryDisposedProc(userRoutine, memoryBlock, refcon)        \
  510.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppICMMemoryDisposedProcInfo, (memoryBlock), (refcon))
  511. #define CallICMConvertDataFormatProc(userRoutine, refCon, flags, desiredFormat, srcData, srcDataSize, dstData, dstDataSize)        \
  512.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppICMConvertDataFormatProcInfo, (refCon), (flags), (desiredFormat), (srcData), (srcDataSize), (dstData), (dstDataSize))
  513. #else
  514. #define CallICMDataProc(userRoutine, dataP, bytesNeeded, refcon)        \
  515.         (*(userRoutine))((dataP), (bytesNeeded), (refcon))
  516. #define CallICMFlushProc(userRoutine, data, bytesAdded, refcon)        \
  517.         (*(userRoutine))((data), (bytesAdded), (refcon))
  518. #define CallICMCompletionProc(userRoutine, result, flags, refcon)        \
  519.         (*(userRoutine))((result), (flags), (refcon))
  520. #define CallICMProgressProc(userRoutine, message, completeness, refcon)        \
  521.         (*(userRoutine))((message), (completeness), (refcon))
  522. #define CallStdPixProc(userRoutine, src, srcRect, matrix, mode, mask, matte, matteRect, flags)        \
  523.         (*(userRoutine))((src), (srcRect), (matrix), (mode), (mask), (matte), (matteRect), (flags))
  524. #define CallICMAlignmentProc(userRoutine, rp, refcon)        \
  525.         (*(userRoutine))((rp), (refcon))
  526. #define CallICMCursorShieldedProc(userRoutine, r, refcon, flags)        \
  527.         (*(userRoutine))((r), (refcon), (flags))
  528. #define CallICMMemoryDisposedProc(userRoutine, memoryBlock, refcon)        \
  529.         (*(userRoutine))((memoryBlock), (refcon))
  530. #define CallICMConvertDataFormatProc(userRoutine, refCon, flags, desiredFormat, srcData, srcDataSize, dstData, dstDataSize)        \
  531.         (*(userRoutine))((refCon), (flags), (desiredFormat), (srcData), (srcDataSize), (dstData), (dstDataSize))
  532. #endif
  533. extern pascal OSErr CodecManagerVersion(long *version)
  534.  TWOWORDINLINE(0x7000, 0xAAA3);
  535.  
  536. extern pascal OSErr GetCodecNameList(CodecNameSpecListPtr *list, short showAll)
  537.  TWOWORDINLINE(0x7001, 0xAAA3);
  538.  
  539. extern pascal OSErr DisposeCodecNameList(CodecNameSpecListPtr list)
  540.  TWOWORDINLINE(0x700F, 0xAAA3);
  541.  
  542. extern pascal OSErr GetCodecInfo(CodecInfo *info, CodecType cType, CodecComponent codec)
  543.  TWOWORDINLINE(0x7003, 0xAAA3);
  544.  
  545. extern pascal OSErr GetMaxCompressionSize(PixMapHandle src, const Rect *srcRect, short colorDepth, CodecQ quality, CodecType cType, CompressorComponent codec, long *size)
  546.  TWOWORDINLINE(0x7004, 0xAAA3);
  547.  
  548. extern pascal OSErr GetCSequenceMaxCompressionSize(ImageSequence seqID, PixMapHandle src, long *size)
  549.  FOURWORDINLINE(0x203C, 0x000C, 0x0074, 0xAAA3);
  550.  
  551. extern pascal OSErr GetCompressionTime(PixMapHandle src, const Rect *srcRect, short colorDepth, CodecType cType, CompressorComponent codec, CodecQ *spatialQuality, CodecQ *temporalQuality, unsigned long *compressTime)
  552.  TWOWORDINLINE(0x7005, 0xAAA3);
  553.  
  554. extern pascal OSErr CompressImage(PixMapHandle src, const Rect *srcRect, CodecQ quality, CodecType cType, ImageDescriptionHandle desc, Ptr data)
  555.  TWOWORDINLINE(0x7006, 0xAAA3);
  556.  
  557. extern pascal OSErr FCompressImage(PixMapHandle src, const Rect *srcRect, short colorDepth, CodecQ quality, CodecType cType, CompressorComponent codec, CTabHandle ctable, CodecFlags flags, long bufferSize, ICMFlushProcRecordPtr flushProc, ICMProgressProcRecordPtr progressProc, ImageDescriptionHandle desc, Ptr data)
  558.  TWOWORDINLINE(0x7007, 0xAAA3);
  559.  
  560. extern pascal OSErr DecompressImage(Ptr data, ImageDescriptionHandle desc, PixMapHandle dst, const Rect *srcRect, const Rect *dstRect, short mode, RgnHandle mask)
  561.  TWOWORDINLINE(0x7008, 0xAAA3);
  562.  
  563. extern pascal OSErr FDecompressImage(Ptr data, ImageDescriptionHandle desc, PixMapHandle dst, const Rect *srcRect, MatrixRecordPtr matrix, short mode, RgnHandle mask, PixMapHandle matte, const Rect *matteRect, CodecQ accuracy, DecompressorComponent codec, long bufferSize, ICMDataProcRecordPtr dataProc, ICMProgressProcRecordPtr progressProc)
  564.  TWOWORDINLINE(0x7009, 0xAAA3);
  565.  
  566. extern pascal OSErr CompressSequenceBegin(ImageSequence *seqID, PixMapHandle src, PixMapHandle prev, const Rect *srcRect, const Rect *prevRect, short colorDepth, CodecType cType, CompressorComponent codec, CodecQ spatialQuality, CodecQ temporalQuality, long keyFrameRate, CTabHandle ctable, CodecFlags flags, ImageDescriptionHandle desc)
  567.  TWOWORDINLINE(0x700A, 0xAAA3);
  568.  
  569. extern pascal OSErr CompressSequenceFrame(ImageSequence seqID, PixMapHandle src, const Rect *srcRect, CodecFlags flags, Ptr data, long *dataSize, UInt8 *similarity, ICMCompletionProcRecordPtr asyncCompletionProc)
  570.  TWOWORDINLINE(0x700B, 0xAAA3);
  571.  
  572. extern pascal OSErr DecompressSequenceBegin(ImageSequence *seqID, ImageDescriptionHandle desc, CGrafPtr port, GDHandle gdh, const Rect *srcRect, MatrixRecordPtr matrix, short mode, RgnHandle mask, CodecFlags flags, CodecQ accuracy, DecompressorComponent codec)
  573.  TWOWORDINLINE(0x700D, 0xAAA3);
  574.  
  575. extern pascal OSErr DecompressSequenceBeginS(ImageSequence *seqID, ImageDescriptionHandle desc, Ptr data, long dataSize, CGrafPtr port, GDHandle gdh, const Rect *srcRect, MatrixRecordPtr matrix, short mode, RgnHandle mask, CodecFlags flags, CodecQ accuracy, DecompressorComponent codec)
  576.  FOURWORDINLINE(0x203C, 0x0030, 0x005D, 0xAAA3);
  577.  
  578. extern pascal OSErr DecompressSequenceFrame(ImageSequence seqID, Ptr data, CodecFlags inFlags, CodecFlags *outFlags, ICMCompletionProcRecordPtr asyncCompletionProc)
  579.  TWOWORDINLINE(0x700E, 0xAAA3);
  580.  
  581. extern pascal OSErr DecompressSequenceFrameS(ImageSequence seqID, Ptr data, long dataSize, CodecFlags inFlags, CodecFlags *outFlags, ICMCompletionProcRecordPtr asyncCompletionProc)
  582.  FOURWORDINLINE(0x203C, 0x0016, 0x0047, 0xAAA3);
  583.  
  584. extern pascal OSErr DecompressSequenceFrameWhen(ImageSequence seqID, Ptr data, long dataSize, CodecFlags inFlags, CodecFlags *outFlags, ICMCompletionProcRecordPtr asyncCompletionProc, const ICMFrameTimeRecord *frameTime)
  585.  FOURWORDINLINE(0x203C, 0x001A, 0x005E, 0xAAA3);
  586.  
  587. extern pascal OSErr CDSequenceFlush(ImageSequence seqID)
  588.  FOURWORDINLINE(0x203C, 0x0004, 0x005F, 0xAAA3);
  589.  
  590. extern pascal OSErr SetDSequenceMatrix(ImageSequence seqID, MatrixRecordPtr matrix)
  591.  TWOWORDINLINE(0x7010, 0xAAA3);
  592.  
  593. extern pascal OSErr SetDSequenceMatte(ImageSequence seqID, PixMapHandle matte, const Rect *matteRect)
  594.  TWOWORDINLINE(0x7011, 0xAAA3);
  595.  
  596. extern pascal OSErr SetDSequenceMask(ImageSequence seqID, RgnHandle mask)
  597.  TWOWORDINLINE(0x7012, 0xAAA3);
  598.  
  599. extern pascal OSErr SetDSequenceTransferMode(ImageSequence seqID, short mode, const RGBColor *opColor)
  600.  TWOWORDINLINE(0x7013, 0xAAA3);
  601.  
  602. extern pascal OSErr SetDSequenceDataProc(ImageSequence seqID, ICMDataProcRecordPtr dataProc, long bufferSize)
  603.  TWOWORDINLINE(0x7014, 0xAAA3);
  604.  
  605. extern pascal OSErr SetDSequenceAccuracy(ImageSequence seqID, CodecQ accuracy)
  606.  TWOWORDINLINE(0x7034, 0xAAA3);
  607.  
  608. extern pascal OSErr SetDSequenceSrcRect(ImageSequence seqID, const Rect *srcRect)
  609.  TWOWORDINLINE(0x7035, 0xAAA3);
  610.  
  611. extern pascal OSErr GetDSequenceImageBuffer(ImageSequence seqID, GWorldPtr *gworld)
  612.  TWOWORDINLINE(0x7015, 0xAAA3);
  613.  
  614. extern pascal OSErr GetDSequenceScreenBuffer(ImageSequence seqID, GWorldPtr *gworld)
  615.  TWOWORDINLINE(0x7016, 0xAAA3);
  616.  
  617. extern pascal OSErr SetCSequenceQuality(ImageSequence seqID, CodecQ spatialQuality, CodecQ temporalQuality)
  618.  TWOWORDINLINE(0x7017, 0xAAA3);
  619.  
  620. extern pascal OSErr SetCSequencePrev(ImageSequence seqID, PixMapHandle prev, const Rect *prevRect)
  621.  TWOWORDINLINE(0x7018, 0xAAA3);
  622.  
  623. extern pascal OSErr SetCSequenceFlushProc(ImageSequence seqID, ICMFlushProcRecordPtr flushProc, long bufferSize)
  624.  TWOWORDINLINE(0x7033, 0xAAA3);
  625.  
  626. extern pascal OSErr SetCSequenceKeyFrameRate(ImageSequence seqID, long keyFrameRate)
  627.  TWOWORDINLINE(0x7036, 0xAAA3);
  628.  
  629. extern pascal OSErr GetCSequenceKeyFrameRate(ImageSequence seqID, long *keyFrameRate)
  630.  FOURWORDINLINE(0x203C, 0x0008, 0x004B, 0xAAA3);
  631.  
  632. extern pascal OSErr GetCSequencePrevBuffer(ImageSequence seqID, GWorldPtr *gworld)
  633.  TWOWORDINLINE(0x7019, 0xAAA3);
  634.  
  635. extern pascal OSErr CDSequenceBusy(ImageSequence seqID)
  636.  TWOWORDINLINE(0x701A, 0xAAA3);
  637.  
  638. extern pascal OSErr CDSequenceEnd(ImageSequence seqID)
  639.  TWOWORDINLINE(0x701B, 0xAAA3);
  640.  
  641. extern pascal OSErr CDSequenceEquivalentImageDescription(ImageSequence seqID, ImageDescriptionHandle newDesc, Boolean *equivalent)
  642.  FOURWORDINLINE(0x203C, 0x000C, 0x0065, 0xAAA3);
  643.  
  644. extern pascal OSErr GetCompressedImageSize(ImageDescriptionHandle desc, Ptr data, long bufferSize, ICMDataProcRecordPtr dataProc, long *dataSize)
  645.  TWOWORDINLINE(0x701C, 0xAAA3);
  646.  
  647. extern pascal OSErr GetSimilarity(PixMapHandle src, const Rect *srcRect, ImageDescriptionHandle desc, Ptr data, Fixed *similarity)
  648.  TWOWORDINLINE(0x701D, 0xAAA3);
  649.  
  650. extern pascal OSErr GetImageDescriptionCTable(ImageDescriptionHandle desc, CTabHandle *ctable)
  651.  TWOWORDINLINE(0x701E, 0xAAA3);
  652.  
  653. extern pascal OSErr SetImageDescriptionCTable(ImageDescriptionHandle desc, CTabHandle ctable)
  654.  TWOWORDINLINE(0x701F, 0xAAA3);
  655.  
  656. extern pascal OSErr GetImageDescriptionExtension(ImageDescriptionHandle desc, Handle *extension, long idType, long index)
  657.  TWOWORDINLINE(0x7020, 0xAAA3);
  658.  
  659. extern pascal OSErr AddImageDescriptionExtension(ImageDescriptionHandle desc, Handle extension, long idType)
  660.  TWOWORDINLINE(0x7021, 0xAAA3);
  661.  
  662. extern pascal OSErr RemoveImageDescriptionExtension(ImageDescriptionHandle desc, long idType, long index)
  663.  FOURWORDINLINE(0x203C, 0x000C, 0x003A, 0xAAA3);
  664.  
  665. extern pascal OSErr CountImageDescriptionExtensionType(ImageDescriptionHandle desc, long idType, long *count)
  666.  FOURWORDINLINE(0x203C, 0x000C, 0x003B, 0xAAA3);
  667.  
  668. extern pascal OSErr GetNextImageDescriptionExtensionType(ImageDescriptionHandle desc, long *idType)
  669.  FOURWORDINLINE(0x203C, 0x0008, 0x003C, 0xAAA3);
  670.  
  671. extern pascal OSErr FindCodec(CodecType cType, CodecComponent specCodec, CompressorComponent *compressor, DecompressorComponent *decompressor)
  672.  TWOWORDINLINE(0x7023, 0xAAA3);
  673.  
  674. extern pascal OSErr CompressPicture(PicHandle srcPicture, PicHandle dstPicture, CodecQ quality, CodecType cType)
  675.  TWOWORDINLINE(0x7024, 0xAAA3);
  676.  
  677. extern pascal OSErr FCompressPicture(PicHandle srcPicture, PicHandle dstPicture, short colorDepth, CTabHandle ctable, CodecQ quality, short doDither, short compressAgain, ICMProgressProcRecordPtr progressProc, CodecType cType, CompressorComponent codec)
  678.  TWOWORDINLINE(0x7025, 0xAAA3);
  679.  
  680. extern pascal OSErr CompressPictureFile(short srcRefNum, short dstRefNum, CodecQ quality, CodecType cType)
  681.  TWOWORDINLINE(0x7026, 0xAAA3);
  682.  
  683. extern pascal OSErr FCompressPictureFile(short srcRefNum, short dstRefNum, short colorDepth, CTabHandle ctable, CodecQ quality, short doDither, short compressAgain, ICMProgressProcRecordPtr progressProc, CodecType cType, CompressorComponent codec)
  684.  TWOWORDINLINE(0x7027, 0xAAA3);
  685.  
  686. extern pascal OSErr GetPictureFileHeader(short refNum, Rect *frame, OpenCPicParams *header)
  687.  TWOWORDINLINE(0x7028, 0xAAA3);
  688.  
  689. extern pascal OSErr DrawPictureFile(short refNum, const Rect *frame, ICMProgressProcRecordPtr progressProc)
  690.  TWOWORDINLINE(0x7029, 0xAAA3);
  691.  
  692. extern pascal OSErr DrawTrimmedPicture(PicHandle srcPicture, const Rect *frame, RgnHandle trimMask, short doDither, ICMProgressProcRecordPtr progressProc)
  693.  TWOWORDINLINE(0x702E, 0xAAA3);
  694.  
  695. extern pascal OSErr DrawTrimmedPictureFile(short srcRefnum, const Rect *frame, RgnHandle trimMask, short doDither, ICMProgressProcRecordPtr progressProc)
  696.  TWOWORDINLINE(0x702F, 0xAAA3);
  697.  
  698. extern pascal OSErr MakeThumbnailFromPicture(PicHandle picture, short colorDepth, PicHandle thumbnail, ICMProgressProcRecordPtr progressProc)
  699.  TWOWORDINLINE(0x702A, 0xAAA3);
  700.  
  701. extern pascal OSErr MakeThumbnailFromPictureFile(short refNum, short colorDepth, PicHandle thumbnail, ICMProgressProcRecordPtr progressProc)
  702.  TWOWORDINLINE(0x702B, 0xAAA3);
  703.  
  704. extern pascal OSErr MakeThumbnailFromPixMap(PixMapHandle src, const Rect *srcRect, short colorDepth, PicHandle thumbnail, ICMProgressProcRecordPtr progressProc)
  705.  TWOWORDINLINE(0x702C, 0xAAA3);
  706.  
  707. extern pascal OSErr TrimImage(ImageDescriptionHandle desc, Ptr inData, long inBufferSize, ICMDataProcRecordPtr dataProc, Ptr outData, long outBufferSize, ICMFlushProcRecordPtr flushProc, Rect *trimRect, ICMProgressProcRecordPtr progressProc)
  708.  TWOWORDINLINE(0x702D, 0xAAA3);
  709.  
  710. extern pascal OSErr ConvertImage(ImageDescriptionHandle srcDD, Ptr srcData, short colorDepth, CTabHandle ctable, CodecQ accuracy, CodecQ quality, CodecType cType, CodecComponent codec, ImageDescriptionHandle dstDD, Ptr dstData)
  711.  TWOWORDINLINE(0x7030, 0xAAA3);
  712.  
  713. extern pascal OSErr GetCompressedPixMapInfo(PixMapPtr pix, ImageDescriptionHandle *desc, Ptr *data, long *bufferSize, ICMDataProcRecord *dataProc, ICMProgressProcRecord *progressProc)
  714.  TWOWORDINLINE(0x7037, 0xAAA3);
  715.  
  716. extern pascal OSErr SetCompressedPixMapInfo(PixMapPtr pix, ImageDescriptionHandle desc, Ptr data, long bufferSize, ICMDataProcRecordPtr dataProc, ICMProgressProcRecordPtr progressProc)
  717.  TWOWORDINLINE(0x7038, 0xAAA3);
  718.  
  719. extern pascal void StdPix(PixMapPtr src, const Rect *srcRect, MatrixRecordPtr matrix, short mode, RgnHandle mask, PixMapPtr matte, const Rect *matteRect, short flags)
  720.  TWOWORDINLINE(0x700C, 0xAAA3);
  721.  
  722. extern pascal OSErr TransformRgn(MatrixRecordPtr matrix, RgnHandle rgn)
  723.  TWOWORDINLINE(0x7039, 0xAAA3);
  724.  
  725. /*
  726. **********
  727.     preview stuff
  728. **********
  729. */
  730. extern pascal void SFGetFilePreview(Point where, ConstStr255Param prompt, FileFilterUPP fileFilter, short numTypes, ConstSFTypeListPtr typeList, DlgHookUPP dlgHook, SFReply *reply)
  731.  TWOWORDINLINE(0x7041, 0xAAA3);
  732.  
  733. extern pascal void SFPGetFilePreview(Point where, ConstStr255Param prompt, FileFilterUPP fileFilter, short numTypes, ConstSFTypeListPtr typeList, DlgHookUPP dlgHook, SFReply *reply, short dlgID, ModalFilterUPP filterProc)
  734.  TWOWORDINLINE(0x7042, 0xAAA3);
  735.  
  736. extern pascal void StandardGetFilePreview(FileFilterUPP fileFilter, short numTypes, ConstSFTypeListPtr typeList, StandardFileReply *reply)
  737.  TWOWORDINLINE(0x7043, 0xAAA3);
  738.  
  739. extern pascal void CustomGetFilePreview(FileFilterYDUPP fileFilter, short numTypes, ConstSFTypeListPtr typeList, StandardFileReply *reply, short dlgID, Point where, DlgHookYDUPP dlgHook, ModalFilterYDUPP filterProc, ActivationOrderListPtr activeList, ActivateYDUPP activateProc, void *yourDataPtr)
  740.  TWOWORDINLINE(0x7044, 0xAAA3);
  741.  
  742. extern pascal OSErr MakeFilePreview(short resRefNum, ICMProgressProcRecordPtr progress)
  743.  TWOWORDINLINE(0x7045, 0xAAA3);
  744.  
  745. extern pascal OSErr AddFilePreview(short resRefNum, OSType previewType, Handle previewData)
  746.  TWOWORDINLINE(0x7046, 0xAAA3);
  747.  
  748.  
  749. enum {
  750.     sfpItemPreviewAreaUser        = 11,
  751.     sfpItemPreviewStaticText    = 12,
  752.     sfpItemPreviewDividerUser    = 13,
  753.     sfpItemCreatePreviewButton    = 14,
  754.     sfpItemShowPreviewButton    = 15
  755. };
  756.  
  757. struct PreviewResourceRecord {
  758.     unsigned long                     modDate;
  759.     short                             version;
  760.     OSType                             resType;
  761.     short                             resID;
  762. };
  763. typedef struct PreviewResourceRecord PreviewResourceRecord;
  764.  
  765. typedef PreviewResourceRecord *PreviewResourcePtr;
  766. typedef PreviewResourcePtr *PreviewResource;
  767. extern pascal void AlignScreenRect(Rect *rp, ICMAlignmentProcRecordPtr alignmentProc)
  768.  FOURWORDINLINE(0x203C, 0x0008, 0x004C, 0xAAA3);
  769.  
  770. extern pascal void AlignWindow(WindowPtr wp, Boolean front, const Rect *alignmentRect, ICMAlignmentProcRecordPtr alignmentProc)
  771.  FOURWORDINLINE(0x203C, 0x000E, 0x004D, 0xAAA3);
  772.  
  773. extern pascal void DragAlignedWindow(WindowPtr wp, Point startPt, Rect *boundsRect, Rect *alignmentRect, ICMAlignmentProcRecordPtr alignmentProc)
  774.  FOURWORDINLINE(0x203C, 0x0014, 0x004E, 0xAAA3);
  775.  
  776. extern pascal long DragAlignedGrayRgn(RgnHandle theRgn, Point startPt, Rect *boundsRect, Rect *slopRect, short axis, UniversalProcPtr actionProc, Rect *alignmentRect, ICMAlignmentProcRecordPtr alignmentProc)
  777.  FOURWORDINLINE(0x203C, 0x001E, 0x004F, 0xAAA3);
  778.  
  779. extern pascal OSErr SetCSequenceDataRateParams(ImageSequence seqID, DataRateParamsPtr params)
  780.  FOURWORDINLINE(0x203C, 0x0008, 0x0050, 0xAAA3);
  781.  
  782. extern pascal OSErr SetCSequenceFrameNumber(ImageSequence seqID, long frameNumber)
  783.  FOURWORDINLINE(0x203C, 0x0008, 0x0051, 0xAAA3);
  784.  
  785. extern pascal OSErr SetCSequencePreferredPacketSize(ImageSequence seqID, long preferredPacketSizeInBytes)
  786.  FOURWORDINLINE(0x203C, 0x0008, 0x0078, 0xAAA3);
  787.  
  788. extern pascal OSErr NewImageGWorld(GWorldPtr *gworld, ImageDescriptionHandle idh, GWorldFlags flags)
  789.  FOURWORDINLINE(0x203C, 0x000C, 0x0052, 0xAAA3);
  790.  
  791. extern pascal OSErr GetCSequenceDataRateParams(ImageSequence seqID, DataRateParamsPtr params)
  792.  FOURWORDINLINE(0x203C, 0x0008, 0x0053, 0xAAA3);
  793.  
  794. extern pascal OSErr GetCSequenceFrameNumber(ImageSequence seqID, long *frameNumber)
  795.  FOURWORDINLINE(0x203C, 0x0008, 0x0054, 0xAAA3);
  796.  
  797. extern pascal OSErr GetBestDeviceRect(GDHandle *gdh, Rect *rp)
  798.  FOURWORDINLINE(0x203C, 0x0008, 0x0055, 0xAAA3);
  799.  
  800. extern pascal OSErr SetSequenceProgressProc(ImageSequence seqID, ICMProgressProcRecord *progressProc)
  801.  FOURWORDINLINE(0x203C, 0x0008, 0x0056, 0xAAA3);
  802.  
  803. extern pascal OSErr GDHasScale(GDHandle gdh, short depth, Fixed *scale)
  804.  FOURWORDINLINE(0x203C, 0x000A, 0x005A, 0xAAA3);
  805.  
  806. extern pascal OSErr GDGetScale(GDHandle gdh, Fixed *scale, short *flags)
  807.  FOURWORDINLINE(0x203C, 0x000C, 0x005B, 0xAAA3);
  808.  
  809. extern pascal OSErr GDSetScale(GDHandle gdh, Fixed scale, short flags)
  810.  FOURWORDINLINE(0x203C, 0x000A, 0x005C, 0xAAA3);
  811.  
  812. extern pascal OSErr ICMShieldSequenceCursor(ImageSequence seqID)
  813.  FOURWORDINLINE(0x203C, 0x0004, 0x0062, 0xAAA3);
  814.  
  815. extern pascal void ICMDecompressComplete(ImageSequence seqID, OSErr err, short flag, ICMCompletionProcRecordPtr completionRtn)
  816.  FOURWORDINLINE(0x203C, 0x000C, 0x0063, 0xAAA3);
  817.  
  818. extern pascal OSErr SetDSequenceTimeCode(ImageSequence seqID, void *timeCodeFormat, void *timeCodeTime)
  819.  FOURWORDINLINE(0x203C, 0x000C, 0x0064, 0xAAA3);
  820.  
  821. extern pascal OSErr CDSequenceNewMemory(ImageSequence seqID, Ptr *data, Size dataSize, long dataUse, ICMMemoryDisposedUPP memoryGoneProc, void *refCon)
  822.  FOURWORDINLINE(0x203C, 0x0018, 0x0066, 0xAAA3);
  823.  
  824. extern pascal OSErr CDSequenceDisposeMemory(ImageSequence seqID, Ptr data)
  825.  FOURWORDINLINE(0x203C, 0x0008, 0x0067, 0xAAA3);
  826.  
  827. extern pascal OSErr CDSequenceNewDataSource(ImageSequence seqID, ImageSequenceDataSource *sourceID, OSType sourceType, long sourceInputNumber, Handle dataDescription, void *transferProc, void *refCon)
  828.  FOURWORDINLINE(0x203C, 0x001C, 0x0068, 0xAAA3);
  829.  
  830. extern pascal OSErr CDSequenceDisposeDataSource(ImageSequenceDataSource sourceID)
  831.  FOURWORDINLINE(0x203C, 0x0004, 0x0069, 0xAAA3);
  832.  
  833. extern pascal OSErr CDSequenceSetSourceData(ImageSequenceDataSource sourceID, void *data, long dataSize)
  834.  FOURWORDINLINE(0x203C, 0x000C, 0x006A, 0xAAA3);
  835.  
  836. extern pascal OSErr CDSequenceChangedSourceData(ImageSequenceDataSource sourceID)
  837.  FOURWORDINLINE(0x203C, 0x0004, 0x006B, 0xAAA3);
  838.  
  839. extern pascal OSErr PtInDSequenceData(ImageSequence seqID, void *data, Size dataSize, Point where, Boolean *hit)
  840.  FOURWORDINLINE(0x203C, 0x0014, 0x006C, 0xAAA3);
  841.  
  842. extern pascal OSErr GetGraphicsImporterForFile(const FSSpec *theFile, ComponentInstance *gi)
  843.  FOURWORDINLINE(0x203C, 0x0008, 0x006E, 0xAAA3);
  844.  
  845. extern pascal OSErr GetGraphicsImporterForDataRef(Handle dataRef, OSType dataRefType, ComponentInstance *gi)
  846.  FOURWORDINLINE(0x203C, 0x000C, 0x0077, 0xAAA3);
  847.  
  848. extern pascal OSErr ImageTranscodeSequenceBegin(ImageTranscodeSequence *its, ImageDescriptionHandle srcDesc, OSType destType, ImageDescriptionHandle *dstDesc, void *data, long dataSize)
  849.  FOURWORDINLINE(0x203C, 0x0018, 0x006F, 0xAAA3);
  850.  
  851. extern pascal OSErr ImageTranscodeSequenceEnd(ImageTranscodeSequence its)
  852.  FOURWORDINLINE(0x203C, 0x0004, 0x0070, 0xAAA3);
  853.  
  854. extern pascal OSErr ImageTranscodeFrame(ImageTranscodeSequence its, void *srcData, long srcDataSize, void **dstData, long *dstDataSize)
  855.  FOURWORDINLINE(0x203C, 0x0014, 0x0071, 0xAAA3);
  856.  
  857. extern pascal OSErr ImageTranscodeDisposeFrameData(ImageTranscodeSequence its, void *dstData)
  858.  FOURWORDINLINE(0x203C, 0x0008, 0x0072, 0xAAA3);
  859.  
  860. extern pascal OSErr CDSequenceInvalidate(ImageSequence seqID, RgnHandle invalRgn)
  861.  FOURWORDINLINE(0x203C, 0x0008, 0x0073, 0xAAA3);
  862.  
  863. extern pascal OSErr ImageFieldSequenceBegin(ImageFieldSequence *ifs, ImageDescriptionHandle desc1, ImageDescriptionHandle desc2, ImageDescriptionHandle descOut)
  864.  FOURWORDINLINE(0x203C, 0x0010, 0x006D, 0xAAA3);
  865.  
  866. extern pascal OSErr ImageFieldSequenceExtractCombine(ImageFieldSequence ifs, long fieldFlags, void *data1, long dataSize1, void *data2, long dataSize2, void *outputData, long *outDataSize)
  867.  FOURWORDINLINE(0x203C, 0x0020, 0x0075, 0xAAA3);
  868.  
  869. extern pascal OSErr ImageFieldSequenceEnd(ImageFieldSequence ifs)
  870.  FOURWORDINLINE(0x203C, 0x0004, 0x0076, 0xAAA3);
  871.  
  872.  
  873. enum {
  874.     identityMatrixType            = 0x00,                            /* result if matrix is identity */
  875.     translateMatrixType            = 0x01,                            /* result if matrix translates */
  876.     scaleMatrixType                = 0x02,                            /* result if matrix scales */
  877.     scaleTranslateMatrixType    = 0x03,                            /* result if matrix scales and translates */
  878.     linearMatrixType            = 0x04,                            /* result if matrix is general 2 x 2 */
  879.     linearTranslateMatrixType    = 0x05,                            /* result if matrix is general 2 x 2 and translates */
  880.     perspectiveMatrixType        = 0x06                            /* result if matrix is general 3 x 3 */
  881. };
  882.  
  883. typedef unsigned short MatrixFlags;
  884. extern pascal short GetMatrixType(const MatrixRecord *m)
  885.  TWOWORDINLINE(0x7014, 0xABC2);
  886.  
  887. extern pascal void CopyMatrix(const MatrixRecord *m1, MatrixRecord *m2)
  888.  TWOWORDINLINE(0x7020, 0xABC2);
  889.  
  890. extern pascal Boolean EqualMatrix(const MatrixRecord *m1, const MatrixRecord *m2)
  891.  TWOWORDINLINE(0x7021, 0xABC2);
  892.  
  893. extern pascal void SetIdentityMatrix(MatrixRecord *matrix)
  894.  TWOWORDINLINE(0x7015, 0xABC2);
  895.  
  896. extern pascal void TranslateMatrix(MatrixRecord *m, Fixed deltaH, Fixed deltaV)
  897.  TWOWORDINLINE(0x7019, 0xABC2);
  898.  
  899. extern pascal void RotateMatrix(MatrixRecord *m, Fixed degrees, Fixed aboutX, Fixed aboutY)
  900.  TWOWORDINLINE(0x7016, 0xABC2);
  901.  
  902. extern pascal void ScaleMatrix(MatrixRecord *m, Fixed scaleX, Fixed scaleY, Fixed aboutX, Fixed aboutY)
  903.  TWOWORDINLINE(0x7017, 0xABC2);
  904.  
  905. extern pascal void SkewMatrix(MatrixRecord *m, Fixed skewX, Fixed skewY, Fixed aboutX, Fixed aboutY)
  906.  TWOWORDINLINE(0x7018, 0xABC2);
  907.  
  908. extern pascal OSErr TransformFixedPoints(const MatrixRecord *m, FixedPoint *fpt, long count)
  909.  TWOWORDINLINE(0x7022, 0xABC2);
  910.  
  911. extern pascal OSErr TransformPoints(const MatrixRecord *mp, Point *pt1, long count)
  912.  TWOWORDINLINE(0x7023, 0xABC2);
  913.  
  914. extern pascal Boolean TransformFixedRect(const MatrixRecord *m, FixedRect *fr, FixedPoint *fpp)
  915.  TWOWORDINLINE(0x7024, 0xABC2);
  916.  
  917. extern pascal Boolean TransformRect(const MatrixRecord *m, Rect *r, FixedPoint *fpp)
  918.  TWOWORDINLINE(0x7025, 0xABC2);
  919.  
  920. extern pascal Boolean InverseMatrix(const MatrixRecord *m, MatrixRecord *im)
  921.  TWOWORDINLINE(0x701C, 0xABC2);
  922.  
  923. extern pascal void ConcatMatrix(const MatrixRecord *a, MatrixRecord *b)
  924.  TWOWORDINLINE(0x701B, 0xABC2);
  925.  
  926. extern pascal void RectMatrix(MatrixRecord *matrix, const Rect *srcRect, const Rect *dstRect)
  927.  TWOWORDINLINE(0x701E, 0xABC2);
  928.  
  929. extern pascal void MapMatrix(MatrixRecord *matrix, const Rect *fromRect, const Rect *toRect)
  930.  TWOWORDINLINE(0x701D, 0xABC2);
  931.  
  932. extern pascal void CompAdd(wide *src, wide *dst)
  933.  TWOWORDINLINE(0x7001, 0xABC2);
  934.  
  935. extern pascal void CompSub(wide *src, wide *dst)
  936.  TWOWORDINLINE(0x7002, 0xABC2);
  937.  
  938. extern pascal void CompNeg(wide *dst)
  939.  TWOWORDINLINE(0x7003, 0xABC2);
  940.  
  941. extern pascal void CompShift(wide *src, short shift)
  942.  TWOWORDINLINE(0x7004, 0xABC2);
  943.  
  944. extern pascal void CompMul(long src1, long src2, wide *dst)
  945.  TWOWORDINLINE(0x7005, 0xABC2);
  946.  
  947. extern pascal long CompDiv(wide *numerator, long denominator, long *remainder)
  948.  TWOWORDINLINE(0x7006, 0xABC2);
  949.  
  950. extern pascal void CompFixMul(wide *compSrc, Fixed fixSrc, wide *compDst)
  951.  TWOWORDINLINE(0x7007, 0xABC2);
  952.  
  953. extern pascal void CompMulDiv(wide *co, long mul, long divisor)
  954.  TWOWORDINLINE(0x7008, 0xABC2);
  955.  
  956. extern pascal void CompMulDivTrunc(wide *co, long mul, long divisor, long *remainder)
  957.  TWOWORDINLINE(0x700C, 0xABC2);
  958.  
  959. extern pascal long CompCompare(wide *a, wide *minusb)
  960.  TWOWORDINLINE(0x7009, 0xABC2);
  961.  
  962. extern pascal Fixed FixMulDiv(Fixed src, Fixed mul, Fixed divisor)
  963.  TWOWORDINLINE(0x700A, 0xABC2);
  964.  
  965. extern pascal Fixed UnsignedFixMulDiv(Fixed src, Fixed mul, Fixed divisor)
  966.  TWOWORDINLINE(0x700D, 0xABC2);
  967.  
  968. extern pascal Fract FracSinCos(Fixed degree, Fract *cosOut)
  969.  TWOWORDINLINE(0x700B, 0xABC2);
  970.  
  971. extern pascal Fixed FixExp2(Fixed src)
  972.  TWOWORDINLINE(0x700E, 0xABC2);
  973.  
  974. extern pascal Fixed FixLog2(Fixed src)
  975.  TWOWORDINLINE(0x700F, 0xABC2);
  976.  
  977. extern pascal Fixed FixPow(Fixed base, Fixed exp)
  978.  TWOWORDINLINE(0x7010, 0xABC2);
  979.  
  980. typedef ComponentInstance GraphicsImportComponent;
  981.  
  982. enum {
  983.     GraphicsImporterComponentType = 'grip'
  984. };
  985.  
  986. /** These are GraphicsImport procedures **/
  987. extern pascal ComponentResult GraphicsImportSetDataReference(GraphicsImportComponent ci, Handle dataRef, OSType dataReType)
  988.  FIVEWORDINLINE(0x2F3C, 0x0008, 0x0001, 0x7000, 0xA82A);
  989.  
  990. extern pascal ComponentResult GraphicsImportGetDataReference(GraphicsImportComponent ci, Handle *dataRef, OSType *dataReType)
  991.  FIVEWORDINLINE(0x2F3C, 0x0008, 0x0002, 0x7000, 0xA82A);
  992.  
  993. extern pascal ComponentResult GraphicsImportSetDataFile(GraphicsImportComponent ci, const FSSpec *theFile)
  994.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0003, 0x7000, 0xA82A);
  995.  
  996. extern pascal ComponentResult GraphicsImportGetDataFile(GraphicsImportComponent ci, FSSpec *theFile)
  997.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0004, 0x7000, 0xA82A);
  998.  
  999. extern pascal ComponentResult GraphicsImportSetDataHandle(GraphicsImportComponent ci, Handle h)
  1000.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0005, 0x7000, 0xA82A);
  1001.  
  1002. extern pascal ComponentResult GraphicsImportGetDataHandle(GraphicsImportComponent ci, Handle *h)
  1003.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0006, 0x7000, 0xA82A);
  1004.  
  1005. extern pascal ComponentResult GraphicsImportGetImageDescription(GraphicsImportComponent ci, ImageDescriptionHandle *desc)
  1006.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0007, 0x7000, 0xA82A);
  1007.  
  1008. extern pascal ComponentResult GraphicsImportGetDataOffsetAndSize(GraphicsImportComponent ci, unsigned long *offset, unsigned long *size)
  1009.  FIVEWORDINLINE(0x2F3C, 0x0008, 0x0008, 0x7000, 0xA82A);
  1010.  
  1011. extern pascal ComponentResult GraphicsImportReadData(GraphicsImportComponent ci, void *dataPtr, unsigned long dataOffset, unsigned long dataSize)
  1012.  FIVEWORDINLINE(0x2F3C, 0x000C, 0x0009, 0x7000, 0xA82A);
  1013.  
  1014. extern pascal ComponentResult GraphicsImportSetClip(GraphicsImportComponent ci, RgnHandle clipRgn)
  1015.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x000A, 0x7000, 0xA82A);
  1016.  
  1017. extern pascal ComponentResult GraphicsImportGetClip(GraphicsImportComponent ci, RgnHandle *clipRgn)
  1018.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x000B, 0x7000, 0xA82A);
  1019.  
  1020. extern pascal ComponentResult GraphicsImportSetSourceRect(GraphicsImportComponent ci, const Rect *sourceRect)
  1021.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x000C, 0x7000, 0xA82A);
  1022.  
  1023. extern pascal ComponentResult GraphicsImportGetSourceRect(GraphicsImportComponent ci, Rect *sourceRect)
  1024.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x000D, 0x7000, 0xA82A);
  1025.  
  1026. extern pascal ComponentResult GraphicsImportGetNaturalBounds(GraphicsImportComponent ci, Rect *naturalBounds)
  1027.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x000E, 0x7000, 0xA82A);
  1028.  
  1029. extern pascal ComponentResult GraphicsImportDraw(GraphicsImportComponent ci)
  1030.  FIVEWORDINLINE(0x2F3C, 0x0000, 0x000F, 0x7000, 0xA82A);
  1031.  
  1032. extern pascal ComponentResult GraphicsImportSetGWorld(GraphicsImportComponent ci, CGrafPtr port, GDHandle gd)
  1033.  FIVEWORDINLINE(0x2F3C, 0x0008, 0x0010, 0x7000, 0xA82A);
  1034.  
  1035. extern pascal ComponentResult GraphicsImportGetGWorld(GraphicsImportComponent ci, CGrafPtr *port, GDHandle *gd)
  1036.  FIVEWORDINLINE(0x2F3C, 0x0008, 0x0011, 0x7000, 0xA82A);
  1037.  
  1038. extern pascal ComponentResult GraphicsImportSetMatrix(GraphicsImportComponent ci, const MatrixRecord *matrix)
  1039.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0012, 0x7000, 0xA82A);
  1040.  
  1041. extern pascal ComponentResult GraphicsImportGetMatrix(GraphicsImportComponent ci, MatrixRecord *matrix)
  1042.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0013, 0x7000, 0xA82A);
  1043.  
  1044. extern pascal ComponentResult GraphicsImportSetBoundsRect(GraphicsImportComponent ci, const Rect *bounds)
  1045.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0014, 0x7000, 0xA82A);
  1046.  
  1047. extern pascal ComponentResult GraphicsImportGetBoundsRect(GraphicsImportComponent ci, Rect *bounds)
  1048.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0015, 0x7000, 0xA82A);
  1049.  
  1050. extern pascal ComponentResult GraphicsImportSaveAsPicture(GraphicsImportComponent ci, const FSSpec *fss, ScriptCode scriptTag)
  1051.  FIVEWORDINLINE(0x2F3C, 0x0006, 0x0016, 0x7000, 0xA82A);
  1052.  
  1053. extern pascal ComponentResult GraphicsImportSetGraphicsMode(GraphicsImportComponent ci, long graphicsMode, const RGBColor *opColor)
  1054.  FIVEWORDINLINE(0x2F3C, 0x0008, 0x0017, 0x7000, 0xA82A);
  1055.  
  1056. extern pascal ComponentResult GraphicsImportGetGraphicsMode(GraphicsImportComponent ci, long *graphicsMode, RGBColor *opColor)
  1057.  FIVEWORDINLINE(0x2F3C, 0x0008, 0x0018, 0x7000, 0xA82A);
  1058.  
  1059. extern pascal ComponentResult GraphicsImportSetQuality(GraphicsImportComponent ci, CodecQ quality)
  1060.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0019, 0x7000, 0xA82A);
  1061.  
  1062. extern pascal ComponentResult GraphicsImportGetQuality(GraphicsImportComponent ci, CodecQ *quality)
  1063.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x001A, 0x7000, 0xA82A);
  1064.  
  1065. extern pascal ComponentResult GraphicsImportSaveAsQuickTimeImageFile(GraphicsImportComponent ci, const FSSpec *fss, ScriptCode scriptTag)
  1066.  FIVEWORDINLINE(0x2F3C, 0x0006, 0x001B, 0x7000, 0xA82A);
  1067.  
  1068. extern pascal ComponentResult GraphicsImportSetDataReferenceOffsetAndLimit(GraphicsImportComponent ci, unsigned long offset, unsigned long limit)
  1069.  FIVEWORDINLINE(0x2F3C, 0x0008, 0x001C, 0x7000, 0xA82A);
  1070.  
  1071. extern pascal ComponentResult GraphicsImportGetDataReferenceOffsetAndLimit(GraphicsImportComponent ci, unsigned long *offset, unsigned long *limit)
  1072.  FIVEWORDINLINE(0x2F3C, 0x0008, 0x001D, 0x7000, 0xA82A);
  1073.  
  1074. extern pascal ComponentResult GraphicsImportGetAliasedDataReference(GraphicsImportComponent ci, Handle *dataRef, OSType *dataRefType)
  1075.  FIVEWORDINLINE(0x2F3C, 0x0008, 0x001E, 0x7000, 0xA82A);
  1076.  
  1077. extern pascal ComponentResult GraphicsImportValidate(GraphicsImportComponent ci, Boolean *valid)
  1078.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x001F, 0x7000, 0xA82A);
  1079.  
  1080. typedef ComponentInstance ImageTranscoderComponent;
  1081.  
  1082. enum {
  1083.     ImageTranscodererComponentType = 'imtc'
  1084. };
  1085.  
  1086. /** These are ImageTranscoder procedures **/
  1087. extern pascal ComponentResult ImageTranscoderBeginSequence(ImageTranscoderComponent itc, ImageDescriptionHandle srcDesc, ImageDescriptionHandle *dstDesc, void *data, long dataSize)
  1088.  FIVEWORDINLINE(0x2F3C, 0x0010, 0x0001, 0x7000, 0xA82A);
  1089.  
  1090. extern pascal ComponentResult ImageTranscoderConvert(ImageTranscoderComponent itc, void *srcData, long srcDataSize, void **dstData, long *dstDataSize)
  1091.  FIVEWORDINLINE(0x2F3C, 0x0010, 0x0002, 0x7000, 0xA82A);
  1092.  
  1093. extern pascal ComponentResult ImageTranscoderDisposeData(ImageTranscoderComponent itc, void *dstData)
  1094.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0003, 0x7000, 0xA82A);
  1095.  
  1096. extern pascal ComponentResult ImageTranscoderEndSequence(ImageTranscoderComponent itc)
  1097.  FIVEWORDINLINE(0x2F3C, 0x0000, 0x0004, 0x7000, 0xA82A);
  1098.  
  1099. /* UPP call backs */
  1100.  
  1101. /* selectors for component calls */
  1102. enum {
  1103.     kGraphicsImportSetDataReferenceSelect            = 0x0001,
  1104.     kGraphicsImportGetDataReferenceSelect            = 0x0002,
  1105.     kGraphicsImportSetDataFileSelect                = 0x0003,
  1106.     kGraphicsImportGetDataFileSelect                = 0x0004,
  1107.     kGraphicsImportSetDataHandleSelect                = 0x0005,
  1108.     kGraphicsImportGetDataHandleSelect                = 0x0006,
  1109.     kGraphicsImportGetImageDescriptionSelect        = 0x0007,
  1110.     kGraphicsImportGetDataOffsetAndSizeSelect        = 0x0008,
  1111.     kGraphicsImportReadDataSelect                    = 0x0009,
  1112.     kGraphicsImportSetClipSelect                    = 0x000A,
  1113.     kGraphicsImportGetClipSelect                    = 0x000B,
  1114.     kGraphicsImportSetSourceRectSelect                = 0x000C,
  1115.     kGraphicsImportGetSourceRectSelect                = 0x000D,
  1116.     kGraphicsImportGetNaturalBoundsSelect            = 0x000E,
  1117.     kGraphicsImportDrawSelect                        = 0x000F,
  1118.     kGraphicsImportSetGWorldSelect                    = 0x0010,
  1119.     kGraphicsImportGetGWorldSelect                    = 0x0011,
  1120.     kGraphicsImportSetMatrixSelect                    = 0x0012,
  1121.     kGraphicsImportGetMatrixSelect                    = 0x0013,
  1122.     kGraphicsImportSetBoundsRectSelect                = 0x0014,
  1123.     kGraphicsImportGetBoundsRectSelect                = 0x0015,
  1124.     kGraphicsImportSaveAsPictureSelect                = 0x0016,
  1125.     kGraphicsImportSetGraphicsModeSelect            = 0x0017,
  1126.     kGraphicsImportGetGraphicsModeSelect            = 0x0018,
  1127.     kGraphicsImportSetQualitySelect                    = 0x0019,
  1128.     kGraphicsImportGetQualitySelect                    = 0x001A,
  1129.     kGraphicsImportSaveAsQuickTimeImageFileSelect    = 0x001B,
  1130.     kGraphicsImportSetDataReferenceOffsetAndLimitSelect = 0x001C,
  1131.     kGraphicsImportGetDataReferenceOffsetAndLimitSelect = 0x001D,
  1132.     kGraphicsImportGetAliasedDataReferenceSelect    = 0x001E,
  1133.     kGraphicsImportValidateSelect                    = 0x001F,
  1134.     kImageTranscoderBeginSequenceSelect                = 0x0001,
  1135.     kImageTranscoderConvertSelect                    = 0x0002,
  1136.     kImageTranscoderDisposeDataSelect                = 0x0003,
  1137.     kImageTranscoderEndSequenceSelect                = 0x0004
  1138. };
  1139.  
  1140. #if PRAGMA_ALIGN_SUPPORTED
  1141. #pragma options align=reset
  1142. #endif
  1143.  
  1144. #if PRAGMA_IMPORT_SUPPORTED
  1145. #pragma import off
  1146. #endif
  1147.  
  1148. #ifdef __cplusplus
  1149. }
  1150. #endif
  1151.  
  1152. #endif /* __IMAGECOMPRESSION__ */
  1153.  
  1154.